<%@ include file="/common/taglibs.jsp" %>


<head>
    <title><fmt:message key="tools.title"/></title>
    <meta name="menu" content="ToolsMenu"/>
</head>


<div class="span3">
    <h2><fmt:message key="bdayEntry.heading"/></h2>
    <c:choose>
        <c:when test="${param.from == 'list'}">
            <p><fmt:message key="bdayEntry.admin.message"/></p>
        </c:when>
        <c:otherwise>
            <p><fmt:message key="bdayEntry.message"/></p>
        </c:otherwise>
    </c:choose>
</div>
<div class="span7">
	 <s:form name="bdayForm" action="saveBday" method="post" validate="true" cssClass="well form-horizontal">
	 	<s:hidden key="bday.id"/>
        <input type="hidden" name="from" value="${param.from}"/>
        
        <c:choose>
    		<c:when test="${param.from == 'list'}">
        		<s:textfield key="bday.name" readonly="true"/>
        	</c:when>
        	<c:otherwise>
        		<s:textfield key="bday.name" required="true"/>        	  
        	</c:otherwise>      	
        </c:choose>
        <s:textfield key="bday.occDate" required="true" />
        <s:textfield key="bday.occType" required="true"/>
        <s:textfield key="bday.alertType"/>
        <s:textfield key="bday.comments" />
        
        
        <fieldset class="form-actions">
            <s:submit key="button.save" method="save" cssClass="btn btn-primary" theme="simple"/>

            <c:if test="${param.from == 'list' and not empty bday.id}">
                <s:submit key="button.delete" method="delete" onclick="return confirmDelete('bday')" cssClass="btn"
                          theme="simple"/>
            </c:if>

            <s:submit key="button.cancel" method="cancel" cssClass="btn" theme="simple"/>
        </fieldset>
	 </s:form>
</div>